// pages/backMoney/backMoney.js
var util = require('../../utils/util');
const App = getApp()

Page({
  data: {
    date: `${new Date().getFullYear()}-${new Date().getMonth() + 1>9?new Date().getMonth() + 1:'0'+(new Date().getMonth() + 1)}`, //日期, //日期
    paymentReceiptInfo: {}
  },
  onLoad(options) {
    this.getDetailData()
  },
  bindDateChange(e) {
    this.setData({
      date: e.detail.value,
    })
    this.getDetailData()
  },
  async getDetailData() {
    // 获取回款详情
    let data = await App.$axios.request({
      url: "/boss/overview/paymentReceiptInfo",
      method: 'GET',
      loading: true,
      data: {
        queryMonth: this.data.date
      }
    })
    if (data) {
      this.setData({
        paymentReceiptInfo: data
      })
    }
  }
})